NOT

[Logical Operator] - Returns True or False for a logic comparsion


Syntax:

NOT argument

Parameters:

argument: any argument

Description:

Performs the Logical Negation and returns TRUE if the arguments is False and vice versa.

Logicals operators are like in ZX Spectrum Basic. Their result can be either False (which is represented with 0) or True, which might be any other value. Don't expect True value number to be always 1. If you need 0/1 values for boolean evaluations, use --strict-boolean compiler option. This might add a little overhead to boolean evaluations, tough.

NOT a
a Result
False True
True False

Examples:

REM 'Not
LET a = 1
IF NOT a THEN
	PRINT "looks like a is zero"
ELSEIF a THEN
	PRINT "a is anything else than a zero"
END IF

Notes:

See also:

AND, OR, XOR


Supported Plattforms:

ZX Spectrum